﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace CrusadeGmTool.Diagnostics
{
    public class StatusUpdateEventArgs : EventArgs
    {
        readonly object _state;
        readonly string _status;
        readonly int _statusLevel;

        public object State
        {
            get { return _state; }
        }

        public string Status
        {
            get { return _status; }
        }

        public int StatusLevel
        {
            get { return _statusLevel; }
        }

        public StatusUpdateEventArgs(string status, params object[] objects)
            : this((object)null, CrusadeGmTool.Diagnostics.StatusLevel.Debug, status, objects)
        {
        }

        public StatusUpdateEventArgs(string status)
            : this(CrusadeGmTool.Diagnostics.StatusLevel.Debug, status)
        {
        }

        public StatusUpdateEventArgs(object state, int statusLevel, string status, params object[] objects)
        {
            _state = state;
            _statusLevel = statusLevel;
            _status = String.Format(CultureInfo.CurrentCulture, status, objects);
        }

        public StatusUpdateEventArgs(int statusLevel, string status)
        {
            _statusLevel = statusLevel;
            _status = status;
        }
    }
}
